<style scoped>
</style>
<template>
  <div>
    <div style="text-align: center;font-size: 25px;margin-bottom: 20px">
      <h1>Sport hard，Party hard!</h1>
      <h3>欢迎来到乐动体育中心网站，在这里，汗水与身体才是王道！</h3>
    </div>
    <div style="width: 1200px;margin: 0 auto">
      <el-carousel trigger="click" height="350px" type="card" indicator-position="none">
        <el-carousel-item v-for="item in bannerList" :key="item">
          <img :src="item" alt="加载失败" width="100%">
        </el-carousel-item>
      </el-carousel>
    </div>
    <div style="margin-top: 50px">
      <h1 style="text-align: center;font-size: 50px;margin-bottom: 20px;">体育中心简介</h1>
      <div>
        <img src="/projectPicture/体育馆外景.jpg" alt="加载失败" width="590px"
             style="display: inline-block;vertical-align: top">
        <div
            style="width: 590px;height: 100px;margin-left:20px;margin-top: 20px;border: none;font-size: 30px;font-weight: bold;display: inline-block">
          &nbsp;&nbsp;乐动体育中心，于2014年6月建成于佛山市，占地面积约10万平方米，其中包括6个标准篮球场、4个标准排球场等大小加起来超过50个运动场所。除此之外，中心还设有休闲区，服务区、医疗区等一系列设施
        </div>
        <span>
        </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "homePage",
  data() {
    return {
      bannerList: [],
    }
  },
  methods: {
    loadBannerList() {
      let url = "http://localhost:9999/zx-album/picture/slideshow"
      this.axios.get(url).then((response) => {
        let result = response.data;
        if (result.state === 200) {
          result = result.data;
          this.bannerList = result;
        } else {
          this.$message({message: "未能成功加载轮播图", type: "warning"})
        }
      })
    }
  },
  mounted() {
    this.bannerList = [];
    this.loadBannerList()
  }
}
</script>

